Sha256: 05bf6ae79e4c7a08c8b45cb1ddd49759e2ec0d95d32c3cc80d8d1e3db957cb0c
Contents?: true
Size: 905 Bytes
Versions: 32
Compression:
Stored size: 905 Bytes
Contents
require 'spec_helper' module Spec module Matchers module DSL describe "#create" do it "is deprecated" do Spec.should_receive(:deprecate) mod = Module.new mod.extend Spec::Matchers::DSL mod.create(:foo) end end 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 Spec::Matchers::DSL mod.define(:foo) obj = Object.new obj.extend mod Spec::Matchers::Matcher.should_receive(:new).with(:foo, 3) obj.foo(3) end end end end end
Version data entries
32 entries across 32 versions & 11 rubygems