News for hackers. Stuff that matters.
Re:Learn how to test Rails using Test::Unit instead of Rspec by pklingem on Thursday March 21, 2013 @05:09PM (#5419027)
one step further:

    describe Article do
      describe '#slug' do
        before do
          subject.title = "Testing with Test::Unit"
        end

        its(:slug) { should_not match(/[^\w-]/) }
        its(:slug) { should_not match(/[A-Z]/) }
        it 'replaces spaces with hyphens'
      end
    end
Re:Learn how to test Rails using Test::Unit instead of Rspec by pjungwir on Thursday March 21, 2013 @05:29PM (#5419194)
I like and use RSpec, but I think these improvements are proving the guy's point that its DSL is forbidding for beginners. I write RSpec more like the original post because it's less magic.
Re:Learn how to test Rails using Test::Unit instead of Rspec by reyan on Thursday March 21, 2013 @05:31PM (#5419218)
Not really. At least RSpec's creator doesn't think so (http://blog.davidchelimsky.net/2012/05/13/spec-smell-explici...).
Re:Learn how to test Rails using Test::Unit instead of Rspec by aaronbrethorst on Thursday March 21, 2013 @06:57PM (#5419898)
neat, I didn't know you could do that. thanks for sharing!