Skip to content

Order tests (II) #7

Closed
wants to merge 2 commits into from

2 participants

@albertovilla

Hi, find attached the modified tests.

Regards,
Alberto

@adelevie
Owner

I merged these changes into my local codebase...how do I run the spec tests? Just rake test?

@adelevie
Owner

Ok, so I was able to run the spec tests:

rspec test/ordertest/spec/post_spec.rb 
.FFF..

Failures:

  1) Comment the ordered_posts should contain 26 posts
     Failure/Error: @ordered_comments.length.should == 26
       expected: 26
            got: 0 (using ==)
     # ./test/ordertest/spec/post_spec.rb:39:in `block (3 levels) in <top (required)>'

  2) Comment the ordered_posts should have 'a' as the first post
     Failure/Error: @ordered_comments.first.title.should == "a"
     NoMethodError:
       undefined method `title' for nil:NilClass
     # ./test/ordertest/spec/post_spec.rb:43:in `block (3 levels) in <top (required)>'

  3) Comment the ordered_posts should have 'z' as the last post
     Failure/Error: @ordered_comments.last.title.should == "z"
     NoMethodError:
       undefined method `title' for nil:NilClass
     # ./test/ordertest/spec/post_spec.rb:47:in `block (3 levels) in <top (required)>'

Finished in 10.35 seconds
6 examples, 3 failures

Failed examples:

rspec ./test/ordertest/spec/post_spec.rb:38 # Comment the ordered_posts should contain 26 posts
rspec ./test/ordertest/spec/post_spec.rb:42 # Comment the ordered_posts should have 'a' as the first post
rspec ./test/ordertest/spec/post_spec.rb:46 # Comment the ordered_posts should have 'z' as the last post

For now, I'll focus on getting #order working and getting its tests working using Test::Unit. At this point, RSPEC isn't worth the cost of switching to a brand new testing suite. I really appreciate you taking the time to work on this project, and I'll make
#order a priority since it's clearly an important feature for you.

@adelevie adelevie closed this Jan 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.