Sha256: d22d5a577dce6c4bd8cb36a6b63f88388037a6a9e64273e459f61534ed013396

Contents?: true

Size: 1.44 KB

Versions: 2

Compression:

Stored size: 1.44 KB

Contents

require 'spec_helper'
describe "Configuration::Field" do
  
  context "unit specs" do
    context "name symbol" do
      before(:each) do
        @field = Configuration::Field.new :some_name
      end
      describe "generate_qualifiers_from" do
        context "with qualifiers" do
          it "uses the qualifiers" do
            @field.generate_qualifiers_from(:qualifiers => :some_qualifiers).should == :some_qualifiers
          end
        end
        context "without qualifiers" do
          context "with qualifier" do
            it "uses the [qualifier]" do
              @field.generate_qualifiers_from(:qualifier => :some_qualifier).should == [:some_qualifier]
            end
          end
          context "without qualifier" do
            context "with name" do
              it "uses the [name]" do
                @field.generate_qualifiers_from(:nork => :blark).should == [:some_name]
              end
            end
          end
        end
      end
    end
    context "name string" do
      before(:each) do
        @field = Configuration::Field.new 'some_name'
      end
      describe "generate_qualifiers_from" do
        context "without qualifiers" do
          context "without qualifier" do
            context "with name" do
              it "uses the [name]" do
                @field.generate_qualifiers_from(:nork => :blark).should == [:some_name]
              end
            end
          end
        end
      end
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picky-0.3.0 spec/lib/configuration/field_spec.rb
picky-0.2.4 spec/lib/configuration/field_spec.rb