Skip to content

Instantly share code, notes, and snippets.

View oguzcanhuner's full-sized avatar

Oguz Huner oguzcanhuner

View GitHub Profile
Scenario: Create a journal
Given a user "John" with password "xyz"
When I go to the new journal path
And I fill in "title" with "New Journal"
And I fill in "cover" with "cover note"
When I click "Create Journal"
Then I should be on the dashboard
describe Squirrel do
let(:squirrel){Squirrel.new}
it "becomes full after eating nuts" do
expect {squirrel.eat!}.to change{squirrel.hungry?}.from(true).to(false)
end
end
describe Squirrel do
let(:squirrel){Squirrel.new}
it "becomes full after eating nuts" do
squirrel.should be_hungry
squirrel.eat :nuts
squirrel.should_not be_hungry
end
end
describe Robot do
let(:robot) {Robot.new(name: "Robbie")}
subject {robot}
it "should be a robot" do
robot.name.should == "Robbie"
end
end
describe Robot do
subject {Robot.new(name: "Robbie")}
it "should be a robot" do
subject.name.should == "Robbie"
end
end