Sha256: a983b0ca2e0c701ce89e7cbb27f6320985db56023084d04c116ebb8355c02660

Contents?: true

Size: 589 Bytes

Versions: 9

Compression:

Stored size: 589 Bytes

Contents

class Card
  module SpecHelper
    module SaveHelper
      include Card::Model::SaveHelper
      def create! name, content=""
        Card.create! name: name, content: content
      end

      def create name_or_args, content_or_args=nil
        Card::Auth.as_bot { super }
      end

      def create_or_update name_or_args, content_or_args=nil
        Card::Auth.as_bot { super }
      end

      def update name_or_args, content_or_args={}
        Card::Auth.as_bot { super }
      end

      def delete name
        Card::Auth.as_bot { Card[name].delete! }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
card-1.91 spec/support/helper/save_helper.rb
card-1.21.0 spec/support/helper/save_helper.rb
card-1.20.4 spec/support/helper/save_helper.rb
card-1.20.3 spec/support/helper/save_helper.rb
card-1.20.2 spec/support/helper/save_helper.rb
card-1.20.1 spec/support/helper/save_helper.rb
card-1.20.0 spec/support/helper/save_helper.rb
card-1.19.6 spec/support/helper/save_helper.rb
card-1.19.5 spec/support/helper/save_helper.rb