Sha256: f9124b9e1c7d65020607e6b68c11f83f1a584febc5c6cac50eb649275c05da7b
Contents?: true
Size: 715 Bytes
Versions: 57
Compression:
Stored size: 715 Bytes
Contents
require 'spec_helper' module RSpec module Matchers module DSL describe "#define" do it "creates a method that initializes a new matcher with the submitted name and expected arg" do # FIXME - this expects new to be called, but we need something # more robust - that expects new to be called with a specific # block (lambda, proc, whatever) mod = Module.new mod.extend RSpec::Matchers::DSL mod.define(:foo) obj = Object.new obj.extend mod RSpec::Matchers::Matcher.should_receive(:new).with(:foo, 3) { stub('matcher').as_null_object } obj.foo(3) end end end end end
Version data entries
57 entries across 57 versions & 6 rubygems