Skip to content

Conversation

@zdavis
Copy link

@zdavis zdavis commented Nov 17, 2015

No description provided.

PatriRor and others added 30 commits July 16, 2014 14:21
autoload instead of long list of requires (in lib/onix.rb)
Set gemfile to :rubygems instead of :gemcutter
The `given` context is equivalent to the previous
`rspec` block.

See the following failures (obtained running `bundle exec rspec spec/audience_range_spec.rb`):
```
  2) ONIX::AudienceRange should provide write access to first level attributes
     Failure/Error: aud.to_xml.to_s.include?("<AudienceRangeValue>999</AudienceRangeValue>").should be_true
       expected: truthy value
            got: false
     # ./spec/audience_range_spec.rb:41:in `block (2 levels) in <top (required)>'
```
Mmmhh, nothing really useful. Note the `expected: truthy value; got: false`. Thanks.
```
  3) ONIX::AudienceRange Given - should provide write access to first level attributes audience_range_values=       Then { aud.to_xml.to_s.include? "<AudienceRangeValue>999</AudienceRangeValue>" }
     Failure/Error: Then { aud.to_xml.to_s.include? "<AudienceRangeValue>999</AudienceRangeValue>" }
       Then expression failed at .../wasabi-git/onix/spec/audience_range_spec.rb:56
         "<AudienceRange>\n  <AudienceRangeValue>[999]</AudienceRangeValue>\n</AudienceRange>"
                      <- aud.to_xml.to_s
         #<Nokogiri::XML::Element:0x3fe3660af5a8 name="AudienceRange" children=[#<Nokogiri::XML::Element:0x3fe3660af0f8 name="AudienceRangeValue" children=[#<Nokogiri::XML::Text:0x3fe3660aebbc "[999]">]>]>
                      <- aud.to_xml
         #<ONIX::AudienceRange:0x007fc6cc185368 @audience_range_precisions=[], @audience_range_values=[999]>
                      <- aud
     # ./spec/audience_range_spec.rb:56:in `block in Then'
```

So we know exactly what's wrong. There is an array, and
it's printed as a single `[999]` literal representation
instead of giving rise to multiple elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants