Sha256: 5c02d61d20f91a9e76e7cc89874df6a27fe6b24fc9f32c35c7b4c61f937c8ca7

Contents?: true

Size: 403 Bytes

Versions: 4

Compression:

Stored size: 403 Bytes

Contents

require "spec_helper"


describe Membrane::Schemas::Value do
  describe "#validate" do
    let(:schema) { Membrane::Schemas::Value.new("test") }

    it "should return nil for values that are equal" do
      schema.validate("test").should be_nil
    end

    it "should return an error for values that are not equal" do
      expect_validation_failure(schema, "tast", /Expected test/)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
membrane-1.1.0 spec/schemas/value_spec.rb
membrane-1.0.0 spec/schemas/value_spec.rb
membrane-0.0.5 spec/schemas/value_spec.rb
membrane-0.0.4 spec/schemas/value_spec.rb