spec/support/matchers/kata.rb in kata-0.2.0 vs spec/support/matchers/kata.rb in kata-1.0.0

- old
+ new

@@ -11,8 +11,16 @@ end RSpec::Matchers.define :have_examples do |summary, requirement, examples| example_str = examples.unshift('').join("\n - ") match do |string| - string.split(/continue \(Y|n\)/)[0].strip == "#{summary}\n #{requirement}#{example_str}" + string.split(/completed \(Y|n\)/)[0].strip == "#{summary}\n #{requirement}#{example_str}" end +end + +%w{url user token}.each do |method| + RSpec::Matchers.define "have_#{method}".to_sym do |expected| + match do |github| + github.send(method) == expected + end + end end