Sha256: 4191b9ebc45bcf8d555cf9f412877e29c809b8a6487d9393b67cb559eb5770e1
Contents?: true
Size: 683 Bytes
Versions: 35
Compression:
Stored size: 683 Bytes
Contents
require_relative "knight_steps" module DragonSteps include KnightSteps attr_accessor :dragon def dragon_attack dragon * 10 end step "there is a dragon" do self.dragon = 1 end step "the dragon attacks the knight" do knight.attacked_for(dragon_attack) end end module RedDragonSteps include DragonSteps attr_accessor :red_dragon def dragon_attack attack = super if red_dragon attack + 15 else attack end end step "the dragon breathes fire" do self.red_dragon = 1 end end RSpec.configure { |c| c.include DragonSteps, :dragon => true } RSpec.configure { |c| c.include RedDragonSteps, :red_dragon => true }
Version data entries
35 entries across 35 versions & 2 rubygems