Hacker News new | ask | show | jobs
by pklingem 4843 days ago
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
3 comments

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.
Not really. At least RSpec's creator doesn't think so (http://blog.davidchelimsky.net/2012/05/13/spec-smell-explici...).
neat, I didn't know you could do that. thanks for sharing!