describe IB::Bar,
:props =>
{:open => 1.31,
:high => 1.35,
:trades => 50,
:time => "20120312 15:41:09",
},
:human =>
"<Bar: 20120312 15:41:09 wap 1.32 OHLC 1.31 1.35 1.3 1.33 trades 50 vol 20000 gaps true>",
:errors =>
{:close => ["is not a number"],
:volume => ["is not a number"]},
:assigns =>
{:has_gaps => {[1, true] => true, [0, false] => false},
[:open, :high, :low, :close, :volume] =>
{[:foo, 'BAR', nil] => /is not a number/}
} do # AKA IB::Bar
it_behaves_like 'Model with invalid defaults'
it_behaves_like 'Self-equal Model'
end
6) IB::Bar behaves like Model with invalid defaults instantiation with properties behaves like Model instantiated with properties auto-assigns all properties given to initializer
Failure/Error:
props.each do |name, value|
# p name, subject.send(name), value
subject.send(name).should == value
end
`example` is not available from within an example (e.g. an `it` block) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc). It is only available on an example group (e.g. a `describe` or `context` block).
Shared Example Group: "Model instantiated with properties" called from ./spec/model_helper.rb:179
Shared Example Group: "Model with invalid defaults" called from ./spec/models/ib/bar_spec.rb:33
# (eval):2:in `rescue in props'
# (eval):2:in `props'
# ./spec/model_helper.rb:220:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# `metadata` is not available from within an example (e.g. an `it` block) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc). It is only available on an example group (e.g. a `describe` or `context` block).
# (eval):2:in `props'
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscribe@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/da2fafd4-6f1a-46de-8f0f-01ba89cb9f74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.