tarcieri/nio4r — comment on commit 449c36dcc39d7d159108d028b845bab4ec873317
File:  line 0
By seancribbs:

Looks like some order-of-evaluation problem. Remember that `let` and `subject` are lazy (but memoized after first evaluation). Here's how I would write it:

```ruby
let(:pipes) { IO.pipe }
let(:reader) { pipes.first }
let(:writer) { pipes.last }
let(:selector) { NIO::Selector.new }
subject { selector.register(reader, :r) }
before { writer << "loldata" }

# Does select have side-effects?
it "knows what IO objects are ready for" do
selector.select(1).should include(subject)
end
its(:readiness){ should == :r }
it { should be_readable }
```