Powered By BlogNow - Get Your Free Blog

I have moved!

My new blog is at lindsaar.net

All the old content will stay here though. But check out the new blog

¿ 23/7/2007 - To Mock or not To Mock, THAT is the question

describe Mock, "usage" do

  before(:each) do
    @type_of = mock(YouShould, :define => "your mock requirements")
    AMock.should_receive(:requests_for_data).
          with("information you provide").and_return("anything")
  end

  it "should be intuitive" do
    @mocks.should_be easy_to_read
  end
  
  it "should not be reliant on fixtures" do
    @a_good = mock(IsNotReliantOn, :fixtures => "at all")
    @a_good.without_fixtures = "happiness"
  end

  it "should describe what you are doing" do
    @mocks.help("You define your application")
    @mocks.should help_not_hinder_production
  end

end
Post A Comment! :: Send to a Friend!

About Me

AKA Raasdnil, this site is about web coding, hosting and all other matters that relate to this... especially Ruby on Rails!

Links