rayvinly (owner)

Revisions

gist: 207453 Download_button fork
public
Public Clone URL: git://gist.github.com/207453.git
Embed All Files: show embed
snippet.rb #
1
2
3
4
5
6
7
8
9
10
11
    context 'when activated' do
      setup do
        @new_subscription = @subscription.user.subscriptions.make(:is_active => false)
      end
      should 'be the only active subscription of a user with multiple subscriptions' do
        @new_subscription.activate!
        assert @new_subscription.is_active
        assert !@subscription.reload.is_active
      end
    end