Sha256: 4230316914a7d429e2b23995a1122d068516d1776f19da9e46755f8e21652894
Contents?: true
Size: 1.6 KB
Versions: 10
Compression:
Stored size: 1.6 KB
Contents
require 'spec_helper' describe Zapata::Revolutionist do before(:all) do @generated = exec_generation('app/models/test_hash.rb') end it '#test_in_arg' do has_block('#test_in_arg', %Q{ expect(test_hash.test_in_arg({ 1 => :one, TestHash => 2.718 })).to eq({ 1 => :one, TestHash => 2.718 }) }) end it '#test_nested_one_level' do has_block('#test_nested_one_level', %Q{ expect(test_hash.test_nested_one_level({ first_level: { 1 => :one, TestHash => 2.718 } })).to eq({ first_level: { 1 => :one, TestHash => 2.718 } }) }) end it '#test_nested_two_levels' do has_block('#test_nested_two_levels', %Q{ expect(test_hash.test_nested_two_levels({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } })).to eq({ second_level: { first_level: { 1 => :one, TestHash => 2.718 } } }) }) end it '#test_nested_three_levels' do has_block('#test_nested_three_levels', %Q{ expect(test_hash.test_nested_three_levels({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } })).to eq({ third_level: { second_level: { first_level: { 1 => :one, TestHash => 2.718 } } } }) }) end it '#test_key_as_another_hash' do has_block('#test_key_as_another_hash', %Q{ expect(test_hash.test_key_as_another_hash({ { 1 => :one, TestHash => 2.718 } => :ratm })).to eq({ { 1 => :one, TestHash => 2.718 } => :ratm }) }) end it '#test_keys_are_symbols' do has_block('#test_keys_are_symbols', %Q{ expect(test_hash.test_keys_are_symbols({ this: 'should', be: 'pretty' })).to eq({ this: 'should', be: 'pretty' }) }) end end
Version data entries
10 entries across 10 versions & 1 rubygems