-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
On 23 May 2012, at 11:41, Rahul Sharma wrote:Hi Guys,It might have been asked many times before but I can't seem to find a good answer.I am trying to do the following:When I block a member on the site for "some reason" for 6 monthsThen I should see the following record:|Active|Time Limit| Start Date | End Date ||true | 6 months | 23-May-2012 12:37:29| 23-Nov-2012 12:37:29|I am using to compare the above table with a similar table on the page.Now , since the test blocks a member in the given step, the start date would be todays date. How can I replace the start date in the table above with something like Time.now('some_formatting') so that i can then match it against what's on the page?I have seen some people suggesting using an extra step to assign current time to a an instance variable and then using it in the table. Is there any simpler way to do this?You could use natural language in your scenarios, then parse the date in your step definition with a gem like chronic:...so you can use terms like "today" or "in 6 months" as your table values.Josh
-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
On 23 May 2012 13:08, Josh Chisholm <joshuac...@gmail.com> wrote:On 23 May 2012, at 11:41, Rahul Sharma wrote:Hi Guys,It might have been asked many times before but I can't seem to find a good answer.I am trying to do the following:When I block a member on the site for "some reason" for 6 monthsThen I should see the following record:|Active|Time Limit| Start Date | End Date ||true | 6 months | 23-May-2012 12:37:29| 23-Nov-2012 12:37:29|I am using to compare the above table with a similar table on the page.Now , since the test blocks a member in the given step, the start date would be todays date. How can I replace the start date in the table above with something like Time.now('some_formatting') so that i can then match it against what's on the page?I have seen some people suggesting using an extra step to assign current time to a an instance variable and then using it in the table. Is there any simpler way to do this?
You could use natural language in your scenarios, then parse the date in your step definition with a gem like chronic:...so you can use terms like "today" or "in 6 months" as your table values.JoshHi Josh,Thanks for your response. I am already using Chronic and also Timecop in my project. The question is how can I use terms like Time.now or Chronic.parse('tomorrow') in the tables?
-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en--
Regards,
Rahul Sharma
Ph:+44 7800 736851
-- There are two rules:
1) Please prefix the subject with [Ruby], [JVM] or [JS]. This allows people to filter messages.
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
Maybe you could just rewrite your step:
Then I should see blocked period extending from now to 6 months
Bill