Skip to content

Instantly share code, notes, and snippets.

@springaki
springaki / tablish_oneliner.rb
Last active December 11, 2015 06:58
Cucumber の tablish の代わり
# tablish
# tableish('table tr', 'th,td')
find('table').all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } }
# ex.
Then /^the table should be:$/ do |table|
table.diff!(find("table").all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } })
end
@springaki
springaki / gist:3080415
Created July 10, 2012 01:24
JSON serialize deserialize Test (JavaScriptSerializer)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;
namespace ConsoleApplication2
{
@springaki
springaki / gist:3080408
Created July 10, 2012 01:21
JSON deserialize test (DataContractJsonSerializer)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
namespace ConsoleApplication
{
[DataContract]