cheezburger

RSpec for lolcats! BDD can be fun too :)

Just put it in your Gemfile:

gem "cheezburger"

And your RSpec files can now be written by cute kittehs (this are cheezburger's own specs, just to see what you can do with it!)

discrieb "Cheezburger" do

dey { Array.new }

deyr(:class) { shud == Array }

iz(:kitteh) { double('kitteh') }

srsly "shud haz cheezburger" do # srsly maeks examplez :focused
  kitteh
  dey.shud_nawt be_nil

  dey.sez(:size).and_return(3)
  
  [3,4,2].shoodz haz(3).elements
  i_hoep {2 + 3}.twerk # twerk meanz to_nawt raise_error
  meh_hoeps {2 + 3}.to_nawt raise_error
  tihs {2 + 3}.shoodz_nawt raise_error
end

# Shared examplez!
fings_dat_maeks "a kitteh" do
  I "haz cheez" do
    i_hoep { ['cheez', 'plz'] }.twerk
  end
end

it_maeks_tings_liek "a kitteh"


discrieb "moar kool tings" do

  suroundid_bai "hyoominz" do
    I "shud liek karot" do
      laterz "lol"
    end
  end

  I "shud be kyoot" do
    dey.shud_get(:toothbrush).and_return("wrrrr")
    dey.shud_nawt_get(:confoozled).and_return("kthxbai")

    dey.toothbrush # => "wrrrrrr" kitteh iz kyoot
  end
end

fur_laterz "shud haz moar cheezburger"

end

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright (c) 2010 Codegram. See LICENSE for details.