source: ruby/branches/0.5/spec/models/encoding_spec.rb@ 228

Last change on this file since 228 was 228, checked in by KOBAYASHI, Shinji, 15 years ago

Terminology implementation is a little difficult

File size: 501 bytes
Line 
1require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
3describe 'encoding in general', :shared => true do
4 before(:all) do
5 @encoding_mock = mock('encoding')
6 end
7end
8
9
10describe Encoding do
11
12 it "should valid charset?" do
13 encodings_proxy = mock('encodings')
14 encodings_proxy.should_receive(:valid_charset?).with('UTF-8').and_return(true)
15 @encoding.stub!(:valid_charset?).and_return(encodings_proxy)
16 encodings_proxy.valid_charset?('UTF-8').should be_true
17 end
18end
Note: See TracBrowser for help on using the repository browser.