Sha256: 1ef299c5a1964ef20d6964266bd6f319fd55bac53b7be8f4d307372fc01e92c1

Contents?: true

Size: 401 Bytes

Versions: 2

Compression:

Stored size: 401 Bytes

Contents

require "spec_helper"


describe Membrane::Schema::Value do
  describe "#validate" do
    let(:schema) { Membrane::Schema::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

2 entries across 2 versions & 1 rubygems

Version Path
membrane-0.0.2 spec/value_schema_spec.rb
membrane-0.0.1 spec/value_schema_spec.rb