Skip to content

Instantly share code, notes, and snippets.

@MarceloCajueiro
Created August 2, 2012 02:42
Show Gist options
  • Save MarceloCajueiro/3232692 to your computer and use it in GitHub Desktop.
Save MarceloCajueiro/3232692 to your computer and use it in GitHub Desktop.
class User
def full_name
"%{first_name} %{last_name}"
end
end
describe User
describe "#full_name" do
it "should be the merge of first and last name"
subject.stub(:first_name).and_return("Marcelo")
subject.stub(:last_name).and_return("Cajueiro")
subject.full_name.should eq("Marcelo Cajueiro")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment