Sha256: faae4b495bfa51e42d5e4a7c7b3ff75f757b764c463b33b129d47bb547d08e77

Contents?: true

Size: 677 Bytes

Versions: 12

Compression:

Stored size: 677 Bytes

Contents

require 'rails_helper'
require 'json'

RSpec.describe <%= @deserializer_class.capitalize %>Deserializer do
  let(:params) { {} }

  describe 'ok' do
    let(:params) { { payload: payload } }
    let(:parsed_params) { { <%= @deserializer_class %>: <%= @deserializer_class %>_params } }
    let(:payload) {
      {
    <% @deserializer_properties.each do |attribute| -%>
    <%= attribute %>: 'string',
    <% end -%>
    }
    }
    let(:<%= @deserializer_class %>_params) {
      {
    <% @deserializer_properties.each do |attribute| -%>
    <%= attribute %>: 'string',
    <% end -%>
    }
    }

    it { expect(described_class.parse(params)).to eq parsed_params }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mobile_workflow-0.12.2 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.12.1 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.12.0 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.11.1 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.11.0 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.10.2 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.10.1 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.10.0 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.9.0 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.8.9 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.7.9 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb
mobile_workflow-0.7.8 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb