Displaying 3 results from an estimated 3 matches for "modelexamplegroup".
2007 Dec 11
3
can''t access helper methods for model testing
...member
end
end
=======
require File.dirname(__FILE__) + ''/../spec_helper''
describe Member do
before(:each) do
@member = valid_member_mock
end
it "should be valid" do
@member.should be_valid
end
end
=======
NameError in ''Spec::Rails::Example::ModelExampleGroup Member should be
valid''
undefined local variable or method `valid_member_mock'' for
#<Spec::Rails::Example::ModelExampleGroup::Subclass_1:0x20e6814>
=======
I would assume that rails is including the helper module behind the
scenes, although I have explicitly made the requir...
2007 Dec 11
3
Transactional/Rollback problems
...r
end
it "should have one user" do
User.count.should == 1
end
end
end
escher: rake db:test:prepare
(in /Users/smt/src/web/urbis/trunk)
escher: ./script/spec spec/models/no_rollback_issue_spec.rb
.F
1)
''Rollback issue 2 should have one user
(Spec::Rails::Example::ModelExampleGroup::Subclass_2)'' FAILED
expected: 1,
got: 2 (using ==)
./spec/models/no_rollback_issue_spec.rb:19:
./script/spec:4:
Finished in 0.343708 seconds
2 examples, 1 failure
But, commenting out the user creation if the first description block
allows the test to pass:
escher: rake db:tes...
2007 Nov 26
8
Renaming RailsExample to RailsExampleGroup
Fyi, I made the following renames:
* RailsExample -> RailsExampleGroup
* FunctionalExample -> FunctionalExampleGroup
* ControllerExample -> ControllerExampleGroup
* ViewExample -> ViewExampleGroup
* HelperExample -> HelperExampleGroup
* ModelExample -> ModelExampleGroup
This was done to keep the naming consistent with ExampleGroup.