Sha256: eb30f06282c2031fbfbae32bc204b20b1a769455016b7cc3497d0553a814d700
Contents?: true
Size: 472 Bytes
Versions: 35
Compression:
Stored size: 472 Bytes
Contents
module KnightSteps attr_accessor :knight class Knight def initialize @hp = 20 end def alive? @hp > 0 end def attacked_for(amount) @hp -= amount end end step "there is a knight" do self.knight = Knight.new end step "the knight is alive" do knight.should be_alive end step "the knight is dead" do knight.should_not be_alive end end RSpec.configure { |c| c.include KnightSteps, :knight => true }
Version data entries
35 entries across 35 versions & 2 rubygems