Skip to content

Instantly share code, notes, and snippets.

@greatseth
Created November 13, 2008 16:45
Show Gist options
  • Select an option

  • Save greatseth/24489 to your computer and use it in GitHub Desktop.

Select an option

Save greatseth/24489 to your computer and use it in GitHub Desktop.
Given /^(the|a|another) user sets his (activity|videos|subscriptions|subscribers) to (public|private)/ do |pronoun, privacy_type, setting|
bool = if setting == 'private'
false
elsif setting == 'public'
true
end
@user2.send((privacy_type + '_public=').to_sym, bool)
@user2.save
@user2.reload
@user2.send((privacy_type + '_public').to_sym).should eql(bool)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment