Skip to content

Instantly share code, notes, and snippets.

@stabenfeldt
Created March 6, 2012 12:11
Show Gist options
  • Save stabenfeldt/1985898 to your computer and use it in GitHub Desktop.
Save stabenfeldt/1985898 to your computer and use it in GitHub Desktop.
Webrat
it "can invite others" do
login(@user, @password)
visit group_path(@group)
within '#group_header' do |scope|
scope.click_link 'Invite'
end
## Output
#
1) Groups invite to privat groups a group member can invite others
Failure/Error: scope.click_link 'Invite'
NoMethodError:
undefined method `click_link' for nil:NilClass
## HTML
#
<div id="group_header">
<a href="/nb/groups/NO0000000995516055-8669559462812/invitations" class="manage">Invite</a>
<a href="/nb/groups/NO0000000995516055-8669559462812/edit" class="manage">Admin</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment