Sha256: 57a13ea45494bb8b19d35475d79ada421bcf617018c72c7959dcb4c8a15b9372

Contents?: true

Size: 1.34 KB

Versions: 3

Compression:

Stored size: 1.34 KB

Contents

require_relative '../../spec_helper'
require_relative 'spec_helper'

describe 'required_field_validator/text_type_value_spec' do

  # keep in mind any ScmOperation has a default value for brand property
  # so it is used
  describe 'GitOperation' do
    before :all do
      GitOperation.auto_migrate!
    end

    before do
      @operation = GitOperation.new(:network_connection => true,
                                    :clean_working_copy => true,
                                    :message            => "I did it! I did it!! Hell yeah!!!")
    end

    describe "with empty message" do
      before do
        @operation.message = ""
      end

      it "is NOT valid for committing" do
        # empty string is not considered present for
        # a text value
        expect(@operation).not_to be_valid_for_committing

        # sanity check since this empty vs blank vs nil
        # thing is a shaky ground
        @operation.message = "RUBY ON RAILS CAN SCALE NOW!!! w00t!!!"
        expect(@operation).to be_valid_for_committing
      end

      it "IS valid for pushing" do
        expect(@operation).to be_valid_for_pushing
      end

      it "IS valid for pulling" do
        expect(@operation).to be_valid_for_pulling
      end

      it "is not valid in default context" do
        expect(@operation).not_to be_valid
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sbf-dm-validations-1.4.0 spec/integration/required_field_validator/text_type_value_spec.rb
sbf-dm-validations-1.3.0 spec/integration/required_field_validator/text_type_value_spec.rb
sbf-dm-validations-1.3.0.beta spec/integration/required_field_validator/text_type_value_spec.rb