-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
90 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.idea | ||
.rvmrc | ||
.ruby-version | ||
|
||
## MAC OS | ||
.DS_Store | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
require 'spec_helper' | ||
# FIXME Without this, test fails when ENV['USE_RAILS'] = '1' | ||
require_relative '../../spec/support/generators/question/question_generator' | ||
|
||
describe :question do | ||
describe Question do | ||
context "without input" do | ||
it "should raise an error" do | ||
proc { subject.should output("Are you a GOD?") }.should raise_error | ||
expect { expect(subject).to output("Are you a GOD?") }.to raise_error | ||
end | ||
end | ||
|
||
with_input "yes" do | ||
it "should act upon something" do | ||
subject.should act_upon("something") | ||
subject.should output(/Acted upon something/) | ||
expect(subject).to act_upon("something") | ||
expect(subject).to output(/Acted upon something/) | ||
end | ||
|
||
it "should not raise an error" do | ||
proc { subject.should output("Good.") }.should_not raise_error | ||
expect { expect(subject).to output("Good.") }.not_to raise_error | ||
end | ||
end | ||
|
||
with_input "no" do | ||
it "should act upon something" do | ||
subject.should act_upon("something") | ||
subject.should output(/Acted upon something/) | ||
expect(subject).to act_upon("something") | ||
expect(subject).to output(/Acted upon something/) | ||
end | ||
|
||
it "should not raise an error" do | ||
proc { subject.should output("You're new around here, aren't you?") }.should_not raise_error | ||
expect { expect(subject).to output("You're new around here, aren't you?") }.not_to raise_error | ||
end | ||
end | ||
end |
Oops, something went wrong.