Skip to content

Instantly share code, notes, and snippets.

View oguzcanhuner's full-sized avatar

Oguz Huner oguzcanhuner

View GitHub Profile
describe Robot do
subject {Robot.new(name: "Robbie")}
it "should be a robot" do
subject.name.should == "Robbie"
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 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 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
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
class Library
def add_book(book)
end
end
class Book
def initialize(name)
@name = name
end
def name
Enter some code..
Enter some code..
Enter some code..
.popout-base-bg.timer-modal-1{style: "#{"display: block;" if show_popup == 1}"}
.popout-base.timer-modal-1{style: "#{"display: block;" if show_popup == 1}"}
.popout-inner
.popout-content
%p.popup-title Like what you see?
%p
Order today using discount code 30MINI and get 30% off - and keep the class for life!
%a.btn.btn-primary#buy-class{href: "#{new_online_activity_enrollment_path(oa)}"}
Claim your discount
%p