Sha256: d343cb3da8f4557b04385fe7ff1510360196eacf0ebc7e69414e82af179b6757

Contents?: true

Size: 721 Bytes

Versions: 9

Compression:

Stored size: 721 Bytes

Contents

require 'spec_helper'

describe ::Rubiks::Schema do
  context 'the class' do
    subject { described_class }

    it { should respond_to :define }

    describe '.define' do
      it 'returns a new instance' do
        new_schema = described_class.define { }
        new_schema.should be_kind_of ::Rubiks::Schema
      end

      it 'evaluates the block' do
        new_schema = described_class.define { name 'Sample Cube' }
        new_schema.name.should eq 'Sample Cube'
      end
    end
  end

  subject { described_class.new }

  it_behaves_like 'a named object'

  it { should respond_to :cube }

  its(:to_xml) { should be_equivalent_to(Nokogiri::XML(<<-XML)) }
    <schema name="Default">
    </schema>
  XML
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubiks-0.1.8 spec/rubiks/schema_spec.rb
rubiks-0.1.7 spec/rubiks/schema_spec.rb
rubiks-0.1.6 spec/rubiks/schema_spec.rb
rubiks-0.1.5 spec/rubiks/schema_spec.rb
rubiks-0.1.4 spec/rubiks/schema_spec.rb
rubiks-0.1.3 spec/rubiks/schema_spec.rb
rubiks-0.1.2 spec/rubiks/schema_spec.rb
rubiks-0.1.1 spec/rubiks/schema_spec.rb
rubiks-0.1.0 spec/rubiks/schema_spec.rb