Sha256: 0100bb3c4db5c5999e2f3efee89fb4e0fae3e5453e392b52f8daa46011ed49e8

Contents?: true

Size: 693 Bytes

Versions: 14

Compression:

Stored size: 693 Bytes

Contents

#
# value_spec.rb
# Crowdskout
#
# Copyright (c) 2016 Kyle Schutt. All rights reserved.require 'spec_helper'

require 'spec_helper'

describe Crowdskout::Components::Value do
  before do 
    @json_string = %[{
                        "id" : 1,
                        "value" : "Male"
                      }]
    @hash = JSON.parse(@json_string)
  end

  it "creates a component" do
    component = Crowdskout::Components::Value.create(@hash)
    expect(component.id).to eq 1
    expect(component.value).to eq "Male"
  end
  it "generates the correct json object" do 
    component = Crowdskout::Components::Value.create(@hash)
    expect(JSON.parse(component.to_json)).to eq @hash
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
crowdskout-0.1.5 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.1.4 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.1.3 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.1.2 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.1.1 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.1.0 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.20 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.19 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.13 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.10 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.9 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.8 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.7 spec/crowdskout/components/profiles/value_spec.rb
crowdskout-0.0.6 spec/crowdskout/components/profiles/value_spec.rb