Sha256: 95605fb03cfaf7da14e376425eb4247a282bd1552bf1bab966ee32bd90dc13dc

Contents?: true

Size: 590 Bytes

Versions: 10

Compression:

Stored size: 590 Bytes

Contents

require 'spec_helper'

describe "Example" do

  it "should properly load the YAML in a file" do
    example_name = :kewlz0rz
    data_structure = {:foo => :bar, :qaz => [1,2,3,4,5]}
    yaml = data_structure.to_yaml
    file_contents = <<-FILE
# Some comment here
=begin YAML
#{yaml}
=end
events.blah.each { |event| }
events.blah2.each { |event| }

# More comments
=begin
another block
=end
    FILE

    flexmock(File).should_receive(:read).once.with(/kewlz0rz\.rb$/).and_return file_contents
    example = Example.new(example_name)
    example.metadata.should == data_structure
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
adhearsion-1.2.6 spec/theatre/spec_helper_spec.rb
adhearsion-1.2.5 spec/theatre/spec_helper_spec.rb
adhearsion-1.2.4 spec/theatre/spec_helper_spec.rb
adhearsion-1.2.3 spec/theatre/spec_helper_spec.rb
adhearsion-1.2.1 spec/theatre/spec_helper_spec.rb
adhearsion-1.2.0 spec/theatre/spec_helper_spec.rb
adhearsion-1.1.1 theatre-spec/spec_helper_spec.rb
adhearsion-1.1.0 theatre-spec/spec_helper_spec.rb
adhearsion-1.0.3 theatre-spec/spec_helper_spec.rb
adhearsion-1.0.2 theatre-spec/spec_helper_spec.rb