File: hash_inspect_test.rb

package info (click to toggle)
libmocha-ruby 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 912 kB
  • ctags: 1,516
  • sloc: ruby: 7,952; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.join(File.dirname(__FILE__), "..", "test_helper")
require 'mocha/inspect'

class HashInspectTest < Test::Unit::TestCase
  
  def test_should_keep_spacing_between_key_value
    hash = {:a => true}
    assert_equal '{:a => true}', hash.mocha_inspect
  end
  
  def test_should_use_mocha_inspect_on_each_item
    hash = {:a => 'mocha'}
    assert_equal "{:a => 'mocha'}", hash.mocha_inspect
  end
  
end