Sha256: da9e78577b837ae8d3cf76f313f11ed7bad4d42051abf0332189597efc61f904

Contents?: true

Size: 707 Bytes

Versions: 17

Compression:

Stored size: 707 Bytes

Contents

describe SharingTags::Context do

  before do
    SharingTags.configure do
      twitter do
        title         "Twitter title"
      end

      facebook do
        title        "Facebook title"
      end
    end
  end

  let(:config) { SharingTags.config }

  describe "method missing" do
    let(:context) { SharingTags::Context.new(:foo, config) }

    it "expect save network attributes to default network" do
      expect { context.title "some title" }.to change { context.default_network.attributes[:title] }
    end

    it "expect raise error when try define unavailable network attribute" do
      expect { context.summary = "title" }.to raise_error(SharingTags::Network::Error)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sharing_tags-0.0.18 spec/models/context_spec.rb
sharing_tags-0.0.17 spec/models/context_spec.rb
sharing_tags-0.0.16 spec/models/context_spec.rb
sharing_tags-0.0.15 spec/models/context_spec.rb
sharing_tags-0.0.14 spec/models/context_spec.rb
sharing_tags-0.0.13 spec/models/context_spec.rb
sharing_tags-0.0.12 spec/models/context_spec.rb
sharing_tags-0.0.11 spec/models/context_spec.rb
sharing_tags-0.0.10 spec/models/context_spec.rb
sharing_tags-0.0.9 spec/models/context_spec.rb
sharing_tags-0.0.8 spec/models/context_spec.rb
sharing_tags-0.0.7 spec/models/context_spec.rb
sharing_tags-0.0.6 spec/models/context_spec.rb
sharing_tags-0.0.5 spec/models/context_spec.rb
sharing_tags-0.0.4 spec/models/context_spec.rb
sharing_tags-0.0.3 spec/models/context_spec.rb
sharing_tags-0.0.2 spec/models/context_spec.rb