Skip to content

Commit

Permalink
Remove Twitter::Configuration::VALID_FORMATS since it was only being …
Browse files Browse the repository at this point in the history
…used in specs
  • Loading branch information
sferik committed Jun 24, 2011
1 parent 0b91afa commit a04e828
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 24 deletions.
7 changes: 0 additions & 7 deletions lib/twitter/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ module Configuration
:search_endpoint,
:user_agent].freeze

# An array of valid request/response formats
#
# @note Not all methods support the XML format.
VALID_FORMATS = [
:json,
:xml].freeze

# The adapter that will be used to connect if none is set
#
# @note The default faraday adapter is Net::HTTP.
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/account_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/block_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/direct_messages_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/favorites_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/friends_and_followers_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/friendship_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/legal_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/list_members_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/list_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/list_subscribers_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/local_trends_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/notification_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/saved_searches_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/spam_reporting_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/timeline_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/tweets_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down
2 changes: 1 addition & 1 deletion spec/twitter/client/user_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'helper'

describe Twitter::Client do
Twitter::Configuration::VALID_FORMATS.each do |format|
%w(json xml).each do |format|
context ".new(:format => '#{format}')" do
before do
@client = Twitter::Client.new(:format => format, :consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT', :oauth_token_secret => 'OS')
Expand Down

0 comments on commit a04e828

Please sign in to comment.