Created
March 21, 2012 15:14
-
-
Save mikeweber/2148233 to your computer and use it in GitHub Desktop.
state testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let(:state1) { | |
FactoryGirl.build(:workflow) | |
} | |
let(:state2) { | |
state1.run_step1 | |
state1 | |
} | |
let(:state3) { | |
state2.run_step2 | |
state2 | |
} | |
context "when in state 1" do | |
subject { state1 } | |
it { should be_in_state1 } | |
end | |
context "when in state 2" do | |
subject { state2 } | |
it { should be_in_state2 } | |
end | |
context "when in state 3" do | |
subject { state3 } | |
it { should be_in_state3 } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment