Sha256: 0c98ff24bf7f3b6d9b156a60356d661315f68a11a03db02d534ffe2317c561e0

Contents?: true

Size: 498 Bytes

Versions: 19

Compression:

Stored size: 498 Bytes

Contents

require 'spec_helper'

describe ContentfulMiddleman::Context do
  describe 'instance methods' do
    it '#set' do
      subject.set('foo', 'bar')
      expect(subject.foo).to eq 'bar'
    end

    it '#get' do
      subject.set('foo', 'bar')
      expect(subject.get('foo')).to eq 'bar'
    end

    describe '#method_missing' do
      it 'when :something= is called it uses #set(something, value)' do
        subject.foo = 'bar'
        expect(subject.foo).to eq 'bar'
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
contentful_middleman-4.2.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-4.1.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-3.0.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-4.0.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-4.0.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-3.0.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.1.3 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.1.2 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.1.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.1.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.0.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-2.0.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.5.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.4.2 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.4.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.4.0 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.3.2 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.3.1 spec/contentful_middleman/commands/context_spec.rb
contentful_middleman-1.2.0 spec/contentful_middleman/commands/context_spec.rb