Sha256: cae6cfcad5752a2f7480a884202ec6d8177197e402d06d04610a7a684c1a0487
Contents?: true
Size: 993 Bytes
Versions: 19
Compression:
Stored size: 993 Bytes
Contents
require 'helper' class TestGnipRules < Test::Unit::TestCase context 'Gnip' do setup do @gnip = Gnip::Rules.new end should "allow creation of rules" do response = @gnip.add([Gnip::Rule.new( '"new spyro"' )]) assert{ response.response.class == Net::HTTPCreated } end should 'allow removal of rules' do response = @gnip.remove([Gnip::Rule.new( '"new spyro"' )]) assert{ response.response.class == Net::HTTPOK } end should 'allow creation of tagged rules' do response = @gnip.add([ Gnip::Rule.new('#skylanders -skylanders -spyro', 'Skylanders')]) assert{ response.response.class == Net::HTTPCreated } end should 'list all rules' do response = @gnip.list assert{ response.response.class == Net::HTTPOK } end should 'delete all rules' do response = @gnip.delete_all! assert{ response.response.class == Net::HTTPOK } assert{ @gnip.list["rules"].empty? } end end end
Version data entries
19 entries across 19 versions & 1 rubygems