On Apr 18, 5:59 pm, David Chelimsky <dchelim...@gmail.com> wrote:
> What do you think of within(n).seconds { ... }?

I'm not sure i understand it fully taking into account the examples
above. Let me try to write them below:
expect {
    link.click
}.to change {div.text}.from("before").to("after").within(2).seconds

link.click
div.should be_present.within(2).seconds

expect {
    link.click
}.to make {div.visible?}.within(2).seconds

And what ought to be the syntactic sugar methods for timeframes:
#seconds, #minutes, #hours?

That syntax doesn't sound too bad, but i see that you wanted to do it
slightly differently by having a block for within(2).seconds... I
think that this removes some of the usages for currently existing
matchers as i've shown above.

WDYT?

Jarmo
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to