Skip to content

Commit

Permalink
checking sequence nextval test only for postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
aserafin committed Jun 17, 2014
1 parent cfd6cc9 commit f998e94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/seeder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
bob.first_name.should == "Bob"
bob.last_name.should == "Bobson"

next_id = SeededModel.connection.execute("select nextval('seeded_models_id_seq')")
next_id[0]['nextval'].to_i.should == 11
if ENV['DB'] == 'postgresql'
next_id = SeededModel.connection.execute("select nextval('seeded_models_id_seq')")
next_id[0]['nextval'].to_i.should == 11
end
end

it "should create a model if one doesn't exist" do
Expand Down

0 comments on commit f998e94

Please sign in to comment.