Sha256: 2d5a4d0852a81722b379e05473112ea3caacc889cc91758665370147c1452f0a
Contents?: true
Size: 689 Bytes
Versions: 4
Compression:
Stored size: 689 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe Pastel::Delegator do describe ".respond_to_missing?" do context 'for a method defined on' do it "returns true" do resolver = double(:resolver) chain = double(:chain) decorator = described_class.new(resolver, chain) expect(decorator.method(:styles)).not_to be_nil end end context "for an undefined method " do it "returns false" do resolver = double(:resolver, color: true) chain = double(:chain) decorator = described_class.new(resolver, chain) expect { decorator.method(:unknown) }.to raise_error(NameError) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pastel-0.4.0 | spec/unit/delegator_spec.rb |
pastel-0.3.0 | spec/unit/delegator_spec.rb |
pastel-0.2.1 | spec/unit/delegator_spec.rb |
pastel-0.2.0 | spec/unit/delegator_spec.rb |