#489 new
Joseph Wilk

Specs fail on ruby 1.8.7 (OS X 10.5.4)

Reported by Joseph Wilk | August 8th, 2008 @ 01:05 PM | in No-Milestone-Assigned

Since moving to ruby 1.8.7 (ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9]) The following specs fail:


1)
RuntimeError in 'Spec::Runner::Formatter::HtmlFormatter should produce HTML identical to the one we designed manually with --diff'
There is no HTML file with expected content for this platform: ./spec/spec/runner/formatter/html_formatted-1.8.7.html
./spec/spec/runner/formatter/html_formatter_spec.rb:19:

2)
RuntimeError in 'Spec::Runner::Formatter::HtmlFormatter should produce HTML identical to the one we designed manually with --dry-run'
There is no HTML file with expected content for this platform: ./spec/spec/runner/formatter/html_formatted-1.8.7.html
./spec/spec/runner/formatter/html_formatter_spec.rb:19:

3)
RuntimeError in 'Spec::Runner::Formatter::TextMateFormatter functional spec using --diff should produce HTML identical to the one we designed manually with --diff'
There is no HTML file with expected content for this platform: ./spec/spec/runner/formatter/text_mate_formatted-1.8.7.html
./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:69:
./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:39:in `produces_html_identical_to_manually_designed_document'
./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:24:in `chdir'
./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:24:in `produces_html_identical_to_manually_designed_document'
./spec/spec/runner/formatter/spec_mate_formatter_spec.rb:65:

4)
NoMethodError in 'Spec::Story::Runner module should wire up a singleton StoryRunner'
undefined method `story_runner' for #<Module:0x311bd10>
./spec/spec/story/runner_spec.rb:20:

5)
NoMethodError in 'Spec::Story::Runner module initialization should add a reporter to the runner classes'
undefined method `story_runner' for #<Module:0x30c56b8>
./spec/spec/story/runner_spec.rb:60:

6)
NoMethodError in 'Spec::Story::Runner module initialization should add a documenter to the runner classes if one is specified'
undefined method `story_runner' for #<Module:0x3063c4c>
./spec/spec/story/runner_spec.rb:75:

7)
NoMethodError in 'Spec::Story::Runner module initialization should add any registered listener to the runner classes'
undefined method `register_listener' for #<Module:0x2ff03c8>
./spec/spec/story/runner_spec.rb:88:

I've fixed the first 3 failures so far, I've yet to find a fix for 4,5,6,7 that works for both 1.8.6 and 1.8.7.

Comments and changes to this ticket

  • Joseph Wilk

    Joseph Wilk August 8th, 2008 @ 01:36 PM

    Failure 4,5,6,7 seem to occur as Runner.dup (dup on a module) no longer seems to be copy the class methods.

  • Joseph Wilk
  • Joseph Wilk

    Joseph Wilk August 8th, 2008 @ 06:40 PM

    • → Tag changed from “bug” to “bug patch”

    I don't know if this qualifies as a ruby bug or if rspecs usage of dup is no longer valid. I'll file a bug report with the ruby developers aswell. You can see the problem in following code.

    
    require 'spec'
    
    module Monkey
      class << self
        def flying
          "Monkey--------->SPLAT"
        end
      end
    end
    
    describe "dup does not include class methods of modules" do
      it "should when using clone return a string" do
        #When
        monkey_dup = Monkey.clone
    
        #Then
        monkey_dup.flying.should eql("Monkey--------->SPLAT")
      end
    
      it "should when using dup return a string" do
        #When
        monkey_dup = Monkey.dup
    
        #Then
        monkey_dup.flying.should eql("Monkey--------->SPLAT")
      end
    
    end
    

    NoMethodError in 'dup does not include class methods of modules should when using dup return a string' undefined method flying' for #<Module:0x31bb7c> ./test.rb:25:

  • Joseph Wilk

    Joseph Wilk August 13th, 2008 @ 01:05 PM

    Upgraded to latest ruby version: ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.4.0]

    And after applying patch attached to this issue left with same failures as above and a new one :(

    1) 'Spec::Runner::CommandLine should not output twice' FAILED expected "" to include "1 example, 0 failures" ./spec/spec/runner/output_one_time_spec.rb:10: ./spec/spec/runner/output_one_time_spec.rb:8:in chdir' ./spec/spec/runner/output_one_time_spec.rb:8:

    2) NoMethodError in 'Spec::Story::Runner module should wire up a singleton StoryRunner' undefined method story_runner' for #<Module:0x3041124> ./spec/spec/story/runner_spec.rb:20:

    3) NoMethodError in 'Spec::Story::Runner module initialization should add a reporter to the runner classes' undefined method story_runner' for #<Module:0x2fecdcc> ./spec/spec/story/runner_spec.rb:60:

    4) NoMethodError in 'Spec::Story::Runner module initialization should add a documenter to the runner classes if one is specified' undefined method story_runner' for #<Module:0x2f92fac> ./spec/spec/story/runner_spec.rb:75:

    5) NoMethodError in 'Spec::Story::Runner module initialization should add any registered listener to the runner classes' undefined method register_listener' for #<Module:0x2f260a0> ./spec/spec/story/runner_spec.rb:88:

  • Joseph Wilk

    Joseph Wilk August 13th, 2008 @ 01:49 PM

    Sorry the new error (Spec::Runner::CommandLine should not output twice) was me not setting up my ruby install correctly. Now getting the same 4 errors: 1) NoMethodError in 'Spec::Story::Runner module should wire up a singleton StoryRunner' undefined method story_runner' for #<Module:0x304952c> ./spec/spec/story/runner_spec.rb:20:

    2) NoMethodError in 'Spec::Story::Runner module initialization should add a reporter to the runner classes' undefined method story_runner' for #<Module:0x2ff85dc> ./spec/spec/story/runner_spec.rb:60:

    3) NoMethodError in 'Spec::Story::Runner module initialization should add a documenter to the runner classes if one is specified' undefined method story_runner' for #<Module:0x2f9da24> ./spec/spec/story/runner_spec.rb:75:

    4) NoMethodError in 'Spec::Story::Runner module initialization should add any registered listener to the runner classes' undefined method register_listener' for #<Module:0x2f310cc> ./spec/spec/story/runner_spec.rb:88: </code>

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket

Tags