code_junkie

Interesting uses of fluent interfaces?

Nov 13th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. unique_words = File.read("words.txt").downcase.split.sort.uniq.length
  2.  
  3. assertThat(yoda).isInstanceOf(Jedi.class)
  4. .isEqualTo(foundJedi)
  5. .isNotEqualTo(foundSith);
  6.  
  7. # bowling_spec.rb
  8. require 'bowling'
  9.  
  10. describe Bowling do
  11. before(:each) do
  12. @bowling = Bowling.new
  13. end
  14.  
  15. it "should score 0 for gutter game" do
  16. 20.times { @bowling.hit(0) }
  17. @bowling.score.should == 0
  18. end
  19. end
Add Comment
Please, Sign In to add comment