sandro / specjour

distributed rspec & cucumber via bonjour
MIT License
212 stars 33 forks source link

CPU spec doesn't work properly on Linux #29

Closed AndrewRadev closed 12 years ago

AndrewRadev commented 13 years ago

The spec for Specjour::CPU stubs the current architecture to imitate a Mac. Unfortunately, it doesn't stub it quite enough, since RUBY_PLATFORM is still not "darwin". This pull request puts the constant in a method and stubs it in the specs, which makes it pass on a Linux box.

It's possible to achieve the same thing by simply setting the constant, but that would issue a warning, hence the indirection.