Sha256: 4d000f56dda61d3cbcf7d346134dae23b1c12ca8b33a6d4d203e4111d9301ffd

Contents?: true

Size: 650 Bytes

Versions: 13

Compression:

Stored size: 650 Bytes

Contents

require File.join(File.dirname(__FILE__), '../spec_helper.rb')

describe Chat do
  
  before do
    @good_chat = "You: Hello\nMe: Hello back at ya!\nYou: Wanna go eat\nYou: Somehwere\nMe: Yes!"
    @bad_chat = "Rating: 4\nItem: Dyson\n\nThis should be the description."
    
    class Yellow; end
    Object.send(:remove_const, :Yellow)
  end
  
  should "detect a well-formed chat" do
    Chat.detect?(@good_chat).should.be.true
  end
  
  should "not detect a malformed chat" do
    Chat.detect?(@bad_chat).should.be.false
  end
  
  should "autodetect a well-formed chat" do
    PostType.auto_detect(@good_chat).should.be.kind_of Chat
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
myobie-turbine-core-0.1.0 spec/post_types/chat_spec.rb
myobie-turbine-core-0.1.1 spec/post_types/chat_spec.rb
myobie-turbine-core-0.2.0 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.0 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.1 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.3 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.5 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.6 spec/post_types/chat_spec.rb
myobie-turbine-core-0.3.7 spec/post_types/chat_spec.rb
myobie-turbine-core-0.4.0 spec/post_types/chat_spec.rb
myobie-turbine-core-0.5.1 spec/post_types/chat_spec.rb
myobie-turbine-core-0.5.2 spec/post_types/chat_spec.rb
myobie-turbine-core-0.5.3 spec/post_types/chat_spec.rb