Sha256: f37f8fca03056a2ad267ab4df823908dd521432deb92200c8cb0c1d3d1cec2fb

Contents?: true

Size: 603 Bytes

Versions: 2

Compression:

Stored size: 603 Bytes

Contents

require 'spec_helper'
require 'ronin/sql/binary_expr'

shared_examples_for "BinaryExpr" do |method,operator=method|
  describe "##{method}" do
    let(:operand) { 1 }
    let(:expr)    { subject.send(method,operand) }

    it "should be a BinaryExpr" do
      expr.should be_kind_of(SQL::BinaryExpr)
    end

    it "should set the left-hand side operand" do
      expr.left.should == subject
    end

    it "should have a '#{operator}' operator" do
      expr.operator.should == operator
    end

    it "should set the right-hand side operand" do
      expr.right.should == operand
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-sql-1.1.0 spec/sql/binary_expr_examples.rb
ronin-sql-1.0.0 spec/sql/binary_expr_examples.rb