| 1 | require 'test/unit' |
|---|
| 2 | require 'rubygems' |
|---|
| 3 | require 'shoulda' |
|---|
| 4 | require 'shoulda/test_unit' |
|---|
| 5 | |
|---|
| 6 | framework 'Foundation' |
|---|
| 7 | |
|---|
| 8 | class MacRubyShouldaTest < Test::Unit::TestCase |
|---|
| 9 | context "NSString instance" do |
|---|
| 10 | setup do |
|---|
| 11 | @string = NSString.stringWithString("~/Documents") |
|---|
| 12 | end |
|---|
| 13 | should "expand tilde in path" do |
|---|
| 14 | # The assert_equal fails for some reason, == might not be right... |
|---|
| 15 | # assert_equal "#{ENV['HOME']}/Documents", @string.stringByExpandingTildeInPath |
|---|
| 16 | assert @string.stringByExpandingTildeInPath.isEqualToString("#{ENV['HOME']}/Documents") |
|---|
| 17 | end |
|---|
| 18 | end |
|---|
| 19 | end |
|---|