search for: country_spec

Displaying 2 results from an estimated 2 matches for "country_spec".

2011 Sep 07
6
FactoryGirl doesnt produce unique names?!
...true, :uniqueness => true end When I run rspec I get following failure: Failures: 1) Country should create a new instance given valid attributes Failure/Error: Factory(:country) ActiveRecord::RecordInvalid: Validation failed: Name has already been taken # ./spec/models/country_spec.rb:5:in `block (2 levels) in <top (required)>'' I have absolutely no idea what''s wrong here since the country''s name is generated with a sequence. I checked the db and it has got 0 entries in the countries table. -- Posted via http://www.ruby-forum.com/. -- You...
2007 May 15
5
Rspec + Oracle
Hi all. Does anybody use Rspec with Oracle? I have RoR app + Oracle DB. I use Rspec 0.9.4. I have installed Rspec plugin and generated spec for model Country. If I use "@countries = Country.new" in my spec I get "ArgumentError in ''Country should be valid'' block not supplied /vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/kernel.rb: 12:in