Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

spec updated

  • Loading branch information...
commit f13a662a0a49f976ef34872b44c564ea7b998789 1 parent 6cb7b28
@martinciu authored
Showing with 23 additions and 20 deletions.
  1. +17 −19 Gemfile.lock
  2. +6 −1 spec/state_machine-mongoid_spec.rb
View
36 Gemfile.lock
@@ -1,22 +1,22 @@
GEM
remote: http://rubygems.org/
specs:
- activemodel (3.0.1)
- activesupport (= 3.0.1)
+ activemodel (3.0.3)
+ activesupport (= 3.0.3)
builder (~> 2.1.2)
- i18n (~> 0.4.1)
- activesupport (3.0.1)
- bson (1.1.1)
- bson_ext (1.1.1)
+ i18n (~> 0.4)
+ activesupport (3.0.3)
+ bson (1.1.4)
+ bson_ext (1.1.4)
builder (2.1.2)
diff-lcs (1.1.2)
git (1.2.5)
- i18n (0.4.2)
- jeweler (1.5.0.pre5)
+ i18n (0.5.0)
+ jeweler (1.5.1)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
- mongo (1.1.1)
+ mongo (1.1.4)
bson (>= 1.1.1)
mongoid (2.0.0.beta.20)
activemodel (~> 3.0)
@@ -25,16 +25,14 @@ GEM
will_paginate (~> 3.0.pre)
rake (0.8.7)
rcov (0.9.9)
- rspec (2.0.1)
- rspec-core (~> 2.0.1)
- rspec-expectations (~> 2.0.1)
- rspec-mocks (~> 2.0.1)
- rspec-core (2.0.1)
- rspec-expectations (2.0.1)
- diff-lcs (>= 1.1.2)
- rspec-mocks (2.0.1)
- rspec-core (~> 2.0.1)
- rspec-expectations (~> 2.0.1)
+ rspec (2.2.0)
+ rspec-core (~> 2.2)
+ rspec-expectations (~> 2.2)
+ rspec-mocks (~> 2.2)
+ rspec-core (2.2.1)
+ rspec-expectations (2.2.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.2.0)
state_machine (0.9.4)
tzinfo (0.3.23)
will_paginate (3.0.pre2)
View
7 spec/state_machine-mongoid_spec.rb
@@ -36,6 +36,11 @@
@vehicle.errors.should_not be_empty
end
+ it "should not allow to set incorrect state" do
+ @vehicle.state = "flying"
+ @vehicle.valid?.should be_false
+ end
+
end
end
@@ -55,7 +60,7 @@
@vehicle.ignite.should be_true
@vehicle.ignite.should be_false
@vehicle.errors.should_not be_empty
- end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.