Sha256: 2324c6fbd9ec2fbbf275eaa79dc7b7166ff693f82edcf504eef0924659d99b0d

Contents?: true

Size: 813 Bytes

Versions: 12

Compression:

Stored size: 813 Bytes

Contents

require 'helper'
require 'cassanity/argument_generators/limit_clause'

describe Cassanity::ArgumentGenerators::LimitClause do
  describe "#call" do
    context "with :limit integer value" do
      it "returns array of arguments" do
        subject.call(limit: 50).should eq([" LIMIT 50"])
      end
    end

    context "with :limit string value" do
      it "returns array of arguments" do
        subject.call(limit: '50').should eq([" LIMIT 50"])
      end
    end

    context "with no arguments" do
      it "returns array of arguments where only item is empty string" do
        subject.call.should eq([""])
      end
    end

    context "with empty arguments" do
      it "returns array of arguments where only item is empty string" do
        subject.call({}).should eq([""])
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cassanity-0.6.0 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.6.0.beta5 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.6.0.beta4 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.6.0.beta3 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.6.0.beta2 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.6.0.beta1 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.5.1 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.5.0 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.4.0 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.3.0 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.2.2 spec/unit/cassanity/argument_generators/limit_clause_spec.rb
cassanity-0.2.1 spec/unit/cassanity/argument_generators/limit_clause_spec.rb