Sha256: 535e0e1b866ca35dbcb1ecd3ddb016e8e814e0d8aa9828efd16e4488a2addfe4

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

require 'spec_helper'

class Context
  include CanTango::Api::Attributes
end

describe CanTango::Api::Attributes do
  subject { Context.new }

  [:read, :edit].each do |action|
    describe ":#{action} attribute" do
      specify do 
        subject.send(:"#{action}_attribute", :post).should == :"#{action}_attr_post"
      end
    end

    describe ":#{action} attributes" do
      specify do 
        subject.send(:"#{action}_attributes", :post, :project).should include(:"#{action}_attr_post")
      end
    end
  end
end
 

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cantango-api-0.1.3 spec/cantango/api/attributes_spec.rb
cantango-api-0.1.2 spec/cantango/api/attributes_spec.rb
cantango-api-0.1.1 spec/cantango/api/attributes_spec.rb
cantango-api-0.1.0 spec/cantango/api/attributes_spec.rb