Is there support for RSpec?

62 views
Skip to first unread message

Alexey Tarasevich

unread,
May 11, 2011, 3:43:26 AM5/11/11
to Cells and Apotomo
The question is how to test apotomo widgets or cells in RSpec? Is it
possible? Are there examples?

Nick Sutterer

unread,
May 11, 2011, 4:04:38 AM5/11/11
to cells-an...@googlegroups.com
Hi Alexey,

Cells has RSpec:
http://nicksda.apotomo.de/2010/12/spec-your-cells-with-rspec-cells/

The Apotomo RSpec support is not hard to build but I'm "terribly busy"
(NOT!) and didn't start with the gem, yet. Are you interested in
helping out?

Nick

Alexey Tarasevich

unread,
May 12, 2011, 2:34:01 AM5/12/11
to Cells and Apotomo
Hi Nick,

I could help.
1. Do you think it should be separate gem (github.com/tarasevich/
rspec_apotomo)?
2. How do you see the syntax of the feature? I think it should be the
same as in Test::Unit.
render_widget :xxx
assert_select "div#xxx"

Nick Sutterer

unread,
May 12, 2011, 2:44:56 AM5/12/11
to cells-an...@googlegroups.com
Yo Alex,

On Thu, May 12, 2011 at 8:34 AM, Alexey Tarasevich
<tarase...@gmail.com> wrote:
> Hi Nick,
>
> I could help.
> 1. Do you think it should be separate gem (github.com/tarasevich/
> rspec_apotomo)?
>

Already there: https://github.com/apotonick/rspec-apotomo

Just fork it? Or do you wanna be the authorative developer? I'm ok with both.

> 2. How do you see the syntax of the feature? I think it should be the
> same as in Test::Unit.
>   render_widget :xxx
>   assert_select "div#xxx"
>

Yeah, the syntax can be similar, we could think about more intuitive
matchers in the next step. You should have a look at the rspec-cells
gem for orientation: https://github.com/apotonick/rspec-cells

What do you think?

Nick

Ritesh

unread,
Jul 6, 2011, 8:31:37 PM7/6/11
to Cells and Apotomo
Hi,

Is there any update on this. I didn't find anything else on google
search

Ritesh

On May 11, 11:44 pm, Nick Sutterer <apoton...@gmail.com> wrote:
> Yo Alex,
>

Nick Sutterer

unread,
Jul 8, 2011, 7:41:39 AM7/8/11
to cells-an...@googlegroups.com
Hi Ritesh,

could you describe your workflow of testing widgets in RSpec? A basic
rspec-apotomo setup could be implemented in a couple of hours, I
guess, so we just have to start ;-)

Nick

Mike Pence

unread,
Jul 10, 2011, 1:47:23 PM7/10/11
to cells-an...@googlegroups.com
+1 on this

Ritesh

unread,
Jul 10, 2011, 5:01:05 PM7/10/11
to Cells and Apotomo
Hi Nick,

No I don't have any particular example. I was wondering you can
provide one. I am just starting to learn to about rspec and found it
to be very useful. Can you use the exact example as testing widget

Ritesh

Ritesh

unread,
Jul 8, 2011, 12:58:45 PM7/8/11
to Cells and Apotomo
Hi Nick,

I am starting to learn rspec and was hoping you can provide the
details :-) . Uptil now I have simply used Rspec to test models but
neither controllers or views. However I am sure lot of people will
benefit if you or someone else can build a small tutorial (similar to
one that you for Widget testing using raisl test units).

Ritesh

Ramon Tayag

unread,
Jul 13, 2011, 12:58:19 AM7/13/11
to cells-an...@googlegroups.com
I've personally found testing controllers and views with plain ol' RSpec a little difficult and unintelligible. You might want to consider using RSpec for models, then something like Cucumber and/or Capybara for everything else -- including widgets that are on the page.

Ramon Tayag

Nick Sutterer

unread,
Jul 13, 2011, 6:56:43 AM7/13/11
to cells-an...@googlegroups.com
On Wed, Jul 13, 2011 at 6:58 AM, Ramon Tayag <ra...@tayag.net> wrote:
> I've personally found testing controllers and views with plain ol' RSpec a
> little difficult and unintelligible. You might want to consider using RSpec
> for models, then something like Cucumber and/or Capybara for everything else
> -- including widgets that are on the page.
>
Using Capybara for testing pages sounds good - however, I will work on
a small rspec-apotomo gem as I have time now.

Nick

Reply all
Reply to author
Forward
0 new messages